home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / euphor14.zip / ED.DOC < prev    next >
Text File  |  1996-10-16  |  10KB  |  207 lines

  1.            +-----------------------+
  2.            |  The Euphoria Editor  |
  3.            +-----------------------+
  4.  
  5.  usage: ed filename
  6.      ed
  7.  
  8.  Summary
  9.  -------
  10.  After any error, just type "ed", and you'll be placed in the editor, at the 
  11.  line and column where the error was detected. The error message will be at 
  12.  the top of your screen.
  13.  
  14.  .e, .ex and .pro files are displayed in color. Other text files are in mono. 
  15.  You'll know that you have misspelled something when the color does not change
  16.  as you expect. Keywords are blue. Names of routines that are built in to 
  17.  ex.exe appear in magenta. Strings are green, comments are red, most other 
  18.  text is black. Balanced brackets (on the same line) have the same color.
  19.  You can change these colors as well as several other parameters of ed. See 
  20.  "user-modifiable parameters" near the top of ed.ex.
  21.  
  22.  The arrow keys move the cursor left, right, up or down. Most other characters
  23.  are immediately inserted into the file.
  24.  
  25.  In Windows, you can "associate" various types of files with ed.bat. You will 
  26.  then be put into ed when you double-click on these types of files - e.g. 
  27.  .e, .pro, .doc etc. Main Euphoria files ending in .ex might better be
  28.  associated with "ex.exe".
  29.  
  30.  Ed is a multi-file/multi-window editor. Esc c will split your screen so 
  31.  you can view and edit up to 10 files simultaneously, with cutting and
  32.  pasting between them. You can also use multiple edit windows to view and edit 
  33.  different parts of a single file. 
  34.  
  35.  Special Keys
  36.  ------------
  37.  <delete>         Delete the current character above the cursor.
  38.  
  39.  <back-space>     Move the cursor to the left and delete a character.
  40.  
  41.  <control-delete> 
  42.       or        Delete the current line. (<control-delete> is not
  43.  <control-d>      available on all systems.)
  44.  
  45.  <insert>         Re-insert the preceding series of deletes or
  46.           control-deletes before the current character or
  47.           current line.
  48.  
  49.  <control-arrow-left>  Move to the start of the previous word.
  50.  
  51.  <control-arrow-right> Move to the start of the next word.
  52.  
  53.  <home>           Move to the beginning of the current line.
  54.  
  55.  <end>            Move to the end of the current line.
  56.  
  57.  <control-home>   Move to the beginning of the file.
  58.  
  59.  <control-end>    Move to the end of the file.
  60.  
  61.  <page up>        Move up one screen.
  62.  
  63.  <page down>      Move down one screen.
  64.  
  65.  F1 ... F10      Select a new current window. The windows are numbered
  66.            from top to bottom, with the top window on the screen
  67.            being F1.
  68.  
  69.  Escape Commands
  70.  ---------------
  71.  Press and release the <Esc> key, then press one of the following keys:
  72.  
  73.  h     Get help text on the editor, or on Euphoria. This operation
  74.       may not work if you are very low on extended memory. 
  75.  
  76.  c     "Clone" the current window, i.e. make a new edit window that is 
  77.       initially viewing the same file at the same position as the
  78.       current window. The sizes of all windows are adjusted to make room
  79.       for the new window. You might want to use Esc l to get more lines
  80.       on the screen. Each window that you create can be scrolled
  81.       independently and each has its own menu bar. The changes that you
  82.       make to a file will initially appear only in the current window.
  83.       When you press an F-key to select a new window, any changes will
  84.       appear there as well. You can use Esc n to read a new file into 
  85.       any window.
  86.  
  87.  q       Quit (delete) the current window and leave the editor if there are 
  88.       no more windows. You'll be warned if this is the last window used for
  89.       editing a modified file. Any remaining windows are given more space.
  90.  
  91.  s       Save the file being edited in the current window, then quit the 
  92.       current window as q above.
  93.  
  94.  w     Save the file but do not quit the window.
  95.  
  96.  e       Save the file, and then execute it with ex. When the program finishes
  97.      execution you'll hear a beep. Hit Enter to return to the editor. 
  98.      This operation may not work if you are very low on extended memory.
  99.      You can't supply any command-line arguments to the program.
  100.      
  101.  d     Run any DOS command. After the beep, hit Enter to return to the editor.
  102.      You could also use this command to edit another file and then return,
  103.      but Esc c is probably more convenient.
  104.  
  105.  n     Start editing a new file in the current window. Deleted lines/chars 
  106.       and search strings are available for use in the new file.
  107.  
  108.  f       Find the next occurrence of a string in the current window. When
  109.       you type in a new string there is an option to "match case" or
  110.       not. Press y if you require upper/lower case to match. Keep hitting 
  111.       Enter to find subsequent occurrences. Any other key stops the search. 
  112.       To search from the beginning, press <control-Home> before Esc f.
  113.      The default string to search for, if you don't type anything,
  114.      is shown in double quotes.
  115.      
  116.  r     Globally replace one string by another. Operates like f command.
  117.      Keep hitting Enter to continue replacing. Be careful -- there is
  118.      no way to skip over a possible replacement.
  119.      
  120.  l     Change the number of lines displayed on the screen. Only certain
  121.      values are allowed, depending on your video card. Many cards will
  122.      allow 25, 28, 43 and 50 lines. 
  123.  
  124.  ddd     Move to line number ddd. e.g. Esc 1023 Enter would move to 
  125.       line 1023 in the file.
  126.  
  127.  CR      Esc <Enter> will tell you the name of the current file, as well as
  128.        the line and character position you are on, and whether the file 
  129.        has been modified since the last save. If you press Esc and then
  130.        change your mind, it is harmless to just hit Enter so you can go back
  131.        to editing.
  132.  
  133.  Cutting and Pasting
  134.  -------------------
  135.  When you <control-delete> a series of consecutive lines, or <delete> a 
  136.  series of consecutive characters, you create a "kill-buffer" containing 
  137.  what you just deleted. This kill-buffer can be re-inserted by moving the
  138.  cursor and then pressing insert. 
  139.  
  140.  A new kill-buffer is started, and the old buffer is lost, each time you 
  141.  move away and start deleting somewhere else. For example, cut a series of 
  142.  lines with <control-delete>. Then move the cursor to where you want to paste
  143.  the lines and press <insert>. If you want to copy the lines, without 
  144.  destroying the original text, first <control-delete> them, then immediately
  145.  press <insert> to re-insert them. Then move somewhere else and press 
  146.  <insert> to insert them again, as many times as you like. You can also 
  147.  <delete> a series of individual *characters*, move the cursor, and then paste
  148.  the deleted characters somewhere else. Immediately press <insert> after 
  149.  deleting if you want to copy without removing the original characters.
  150.  
  151.  Once you have a kill-buffer, you can type Esc n to read in a new file, or you
  152.  can press an F-key to select a new edit window. You can then insert your kill
  153.  buffer.
  154.  
  155.  Use of Tabs
  156.  -----------
  157.  The standard tab width on MS-DOS is 8 spaces. The editor assumes tab=8 for 
  158.  most files. However, it is more convenient when editing a program for a 
  159.  tab to equal the amount of space that you like to indent. Therefore you will
  160.  find that tabs are set to 4 when you edit Euphoria files (or .c, or .h 
  161.  or .bas files). The editor converts from tab=8 to tab=4 when reading your 
  162.  program file, and converts back to tab=8 when you save the file. Thus your
  163.  file remains compatible with the tab=8 world, e.g. MS-DOS PRINT, EDIT, etc.
  164.  If you would like to choose a different number of spaces to indent, change
  165.  the line at the top of ed.ex that says "constant PROG_INDENT = 4".
  166.  
  167.  Lines longer than 80 characters
  168.  -------------------------------
  169.  Lines longer than 80 are marked with an inverse video character in the
  170.  80th column. Ed will not display past column 80. By deleting the carriage 
  171.  return at the end of a line, you can combine it with the next line to create
  172.  a line longer than 80. You can also break a long line by inserting a 
  173.  carriage return.
  174.  
  175.  Maximum File Size
  176.  -----------------
  177.  Like any Euphoria program, ed can use extended memory. It will edit files 
  178.  that are much larger than what MS-DOS EDIT or Windows Notepad can handle.
  179.  With a huge file, inserting or deleting a line near the beginning of the file
  180.  might take 20 seconds or longer, due to intense swapping activity. Other 
  181.  operations should be reasonably quick.
  182.  
  183.  Non-text Files
  184.  --------------
  185.  ed is designed for editing pure text files, although you can use it to
  186.  view other files. As ed reads in a file, it replaces non-printable 
  187.  characters (less than ASCII 32) with ASCII 254 - small square. If you 
  188.  try to save a non-text file you will be warned about this. (MS-DOS EDIT
  189.  will quietly corrupt a non-text file - do not save!). Since ed opens all
  190.  files as "text" files, the control-Z character (26) will appear to be the
  191.  end of the file.
  192.  
  193.  Windows 95 Long Filenames
  194.  -------------------------
  195.  You can edit existing files that have pathnames with long names in them, 
  196.  however in this release ed will not create *new* files with long names. The 
  197.  name will be truncated to the standard DOS 8.3 length.
  198.  
  199.  Source Code
  200.  -----------
  201.  The complete source code to this editor is in bin\ed.ex and bin\syncolor.e. 
  202.  You are welcome to make improvements. There is a section at the top of
  203.  ed.ex containing "user-modifiable" configuration parameters that you
  204.  may want to adjust. The colors and the cursor size may require adjusting for
  205.  some operating environments.
  206.  
  207.